import request from '@/utils/request'

export function listAssessmentOptions(query) {
  return request({
    url: '/kh/assessment/options',
    method: 'get',
    params: query
  })
}

// 查询考核列表
export function listAssessment(query) {
  return request({
    url: '/kh/assessment/list',
    method: 'get',
    params: query
  })
}

// 查询考核详细
export function getAssessment(id) {
  return request({
    url: '/kh/assessment/' + id,
    method: 'get'
  })
}

// 查询被考核公司
export function getAssessmentDept(query) {
  return request({
    url: '/kh/assessment/assessdept/' + query.id,
    method: 'get',
    params: query
  })
}

// 新增考核
export function addAssessment(data) {
  return request({
    url: '/kh/assessment',
    method: 'post',
    data: data
  })
}

// 修改考核
export function updateAssessment(data) {
  return request({
    url: '/kh/assessment',
    method: 'put',
    data: data
  })
}

// 删除考核
export function delAssessment(id) {
  return request({
    url: '/kh/assessment/' + id,
    method: 'delete'
  })
}

// 导出考核
export function exportAssessment(query) {
  return request({
    url: '/kh/assessment/export',
    method: 'get',
    params: query
  })
}
